-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(wasm): combine config and json_config fields #11697
Conversation
4189c70
to
c61c577
Compare
c61c577
to
5b09011
Compare
912f92f
to
1e4a488
Compare
filter.json_config = nil | ||
-- Serialize all JSON configurations up front | ||
-- | ||
-- NOTE: there is a subtle difference between a raw, non-JSON filter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewers: we've judged filters that require a JSON-encoded string to be an uncommon use case, compared to, say, an object or an array, which will still work perfectly fine.
1e4a488
to
a963cb1
Compare
note: changes to Wasm have been given special approval for merge after feature freeze, due to the feature's self-contained nature and current beta/tech preview/unstable status. |
a963cb1
to
abd546f
Compare
just rebased |
This allows JSON filter configuration to live in the same .config attribute as raw configuration. Filters must have an associated JSON schema in order to use this feature.
be69334
to
018c5bf
Compare
Summary
This change combines the
config
andjson_config
fields for Wasm filters.Before, JSON configuration lived in the
json_config
attribute, andconfig
could only hold strings:Now, both string and JSON configurations live in
config
:The
json_config
field/attribute was introduced recently and is unreleased, so this change does not break any existing API.Note: filters may only use JSON in
config
if they have supplied a JSON schema in a{{filter}}.meta.json
file. Filters without a JSON schema may still accept JSON configuration, but it must be serialized, and it will not be validated in any way by the admin API:Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdFull changelog
json_schema.default
fallback schema for dynamic JSON subschemasfilter_chain.filters[].config
and renamefilter_chain.filters[].json_config
tofilter_chain.filters[].config
filter_chain.filters[].config
of{ "type": [ "string", "null" ] }
Issue reference
KAG-2707